<?php

namespace console\migrations;

use console\migrations\Base;

/**
 * Handles adding columns to table `{{%file}}`.
 */
class M200909063041AddCommentColumnToFileTable extends Base
{
    protected string $tableName = '{{%file}}';

    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->addColumn($this->tableName, 'comment', $this->string( 255 )->notNull()->comment('简介')->defaultValue( '' ));
    }

    /**
     * {@inheritdoc}
     */
    public function safeDown()
    {
        $this->dropColumn($this->tableName, 'comment');
    }
}
